package thread.basepackage.t4;

/**
 * 沉睡中停止线程
 * Created by cuihao on 2017/11/28.
 */
public class MyThread extends Thread {
    @Override
    public void run() {
        super.run();
        try {
            System.out.println("run begion");
            System.out.println(currentThread().getName() + " 线程开始休眠");
            Thread.sleep(20000000);
            System.out.println();
        } catch (InterruptedException e) {
            System.out.println("我在沉睡中被停止了！！ 进入catch" + this.isInterrupted());
            e.printStackTrace();
        }
    }
}
